function test(){
	ApplicationDWRService.searchJsonApplication(callBackResult);
 }
function callBackResult(result) {
	  var arg=eval(result);
	  var appkey='';
	  for(i=0;i<arg.length;i++)
		  {
		  appkey=appkey+arg[i].appkey;
		     
		  }
	  alert(appkey);
}
function deleteApplication(dom,index)
{
	if (window.confirm("Are you sure delete the application?")) {
		var ID=document.getElementById("radiotable_tr_td_"+index).innerHTML;
		ApplicationDWRService.delJsonApplication(ID,function(data){callbackdel(data,index);});
		
    }	
	
	return false;
}
var callbackdel =function callBackResultDel(result,index) {
	  var arg=eval(result);
	  if(arg>0)
	  {		 
		 
		  var row=document.getElementById("radiotable_tr_"+index); 
		  $(row).remove(); 
	  }
};

function findApplication(dom,index)
{
	
	//get the table first td's value
	var ID=document.getElementById("radiotable_tr_td_"+index).innerHTML;
	ApplicationDWRService.findJsonApplication(ID,function(data){callbackFind(data,index);});
}
var callbackFind =function callBackResultfind(result,index)
{
	
	var arg=eval(result);
	
	document.getElementById("applicationedit:txtindex").value=index;
	document.getElementById("applicationedit:txtid").value=arg.id;
	document.getElementById("applicationedit:txtappid").value=arg.appID;
	document.getElementById("applicationedit:txtapplication").value=arg.application;
	document.getElementById("applicationedit:txtversion").value=arg.appVersion;
	document.getElementById("applicationedit:txtcopyright").value=arg.appCopyRight;
	showLayer('1');
}